home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / irix / scripts / rcs / ciAll < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.2 KB  |  57 lines

  1. #!/bin/csh -f
  2. #
  3. # $Id: ciAll,v 1.1 93/11/02 13:12:06 carlson Exp $
  4. #
  5. # This script checks in all the files in the current directory.
  6. #
  7. # Parameters:
  8. #    $*        Any special options in ci command.
  9. #
  10. # Revision History:
  11. #    $Log:    ciAll,v $
  12. # Revision 1.1  93/11/02  13:12:06  carlson
  13. # Initial revision
  14. #--------------------------------------------------------------------
  15.  
  16. if ( $#argv < 1 ) then
  17.     echo "Usage: $argv[0] [options ...]"
  18.     echo "    where: [options] are any additional options to be"
  19.     echo "                     provided with the 'ci' command."
  20.     exit 0
  21. endif
  22.  
  23. #----
  24. # Collect the options
  25. #
  26.  
  27. if ( $#argv >= 1 ) then
  28.     set options = ( $* )
  29. else
  30.     set options = ""
  31. endif
  32.  
  33. #----
  34. # Scan through files in this directory, skipping directories.
  35. #
  36.  
  37. foreach file ( * )
  38.     if ( -d $file ) continue
  39.     if ( -r RCS/$file,v ) then
  40.  
  41.     rcs -l $file
  42.     echo "Checking in $file"
  43.     /usr/sbin/ci $options $file
  44.     else
  45.     echo "$file has never been checked in."
  46.     echo "Do you want to check this in? \c"
  47.     set rev = $<
  48.     if ( "$rev" == "y" ) then
  49.         head -30 $file
  50.         echo "-----"
  51.         /usr/sbin/ci $options $file
  52.     endif
  53.     endif
  54.     echo "-----------------------------------------------------------"
  55. end
  56.